const tcb = require('@cloudbase/node-sdk');
const app = tcb.init({
  env: "cgc-3gi1zfana3604dcc"
});
// 获取数据库的引用
const db = app.database();
const _ = db.command;
const cgc = db.collection('cgc');
exports.main = async (data, context) => {
  let res = cgc.where(_.and([{
    username: data.username,
  }, {
    password: data.password
  }])).get();
  return res;
};